﻿using System.ComponentModel.DataAnnotations;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using HengTong.Model.Db.Hr;


namespace HengTong.ViewModel.Person.SysPersonWorkVms
{
    public partial class SysPersonWorkTemplateVm : BaseTemplateVM
    {
        [Display(Name = "员工")]
        public ExcelPropety PersonExcel = ExcelPropety.CreateProperty<SysPersonWork>(x => x.PersonId);
        [Display(Name = "工作单位")]
        public ExcelPropety CompanyExcel = ExcelPropety.CreateProperty<SysPersonWork>(x => x.Company);
        [Display(Name = "岗位")]
        public ExcelPropety PositionExcel = ExcelPropety.CreateProperty<SysPersonWork>(x => x.Position);
        [Display(Name = "到职日期")]
        public ExcelPropety StartDateExcel = ExcelPropety.CreateProperty<SysPersonWork>(x => x.StartDate);
        [Display(Name = "离职日期")]
        public ExcelPropety EndDateExcel = ExcelPropety.CreateProperty<SysPersonWork>(x => x.EndDate);
        [Display(Name = "证明人")]
        public ExcelPropety ReferenceExcel = ExcelPropety.CreateProperty<SysPersonWork>(x => x.Reference);

	    protected override void InitVM()
        {
            PersonExcel.DataType = ColumnDataType.ComboBox;
            PersonExcel.ListItems = DC.Set<SysPerson>().GetSelectListItems(Wtm, y => y.Name);
        }

    }

    public class SysPersonWorkImportVm : BaseImportVM<SysPersonWorkTemplateVm, SysPersonWork>
    {

    }

}
